Crate criterion [−] [src]
A statistics-driven micro-benchmarking library written in Rust.
This crate is a microbenchmarking library which aims to provide strong statistical confidence in detecting and estimating the size of performance improvements and regressions, whle also being easy to use.
See the user guide for examples as well as details on the measurement and analysis process, and the output.
Features:
- Benchmark Rust code as well as external programs
- Collects detailed statistics, providing strong confidence that changes to performance are real, not measurement noise
- Produces detailed charts, providing thorough understanding of your code's performance behavior.
Macros
criterion_group |
Macro used to define a benchmark group for the benchmark harness; see the criterion! macro for more details. |
criterion_main |
Macro which expands to a benchmark harness. |
Structs
Bencher |
Helper struct to time routines |
Criterion |
The benchmark manager |
Fun |
Representing a function to benchmark together with a name of that function.
Used together with |
Functions
black_box |
A function that is opaque to the optimizer, used to prevent the compiler from optimizing away computations in a benchmark. |
init_logging |
Initialize the logging for a Criterion benchmark. This should be called first before executing Criterion benchmarks, unless the user provides their own logging infrastructure. |